﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.ServiceModel;
using System.Text;
using TestService.Contract.Faults;

namespace TestService.Contract
{
    /// <summary>
    /// 事件代理
    /// </summary>
    [ServiceContract(Namespace = "http://TestService.Contract",
                     SessionMode = SessionMode.Required,
                     CallbackContract = typeof(IEventBrokerCallback))]
    public interface IEventBroker
    {
        [OperationContract(IsOneWay = false)]
        [FaultContract(typeof(EventBrokerException))]
        void Subscribe(Guid subscriptionId, string[] eventNames);

        [OperationContract(IsOneWay = true)]
        void EndSubscription(Guid subscriptionId);
    }
}
